<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>lesson 9</title>
    <style>
        .red{
            color: red;
        }
        .green{
            color: green;
        }
    </style>
</head>
<body>
    <div id="root"></div>
</body>
</html>
<script src="https://unpkg.com/vue@next"></script>
<script>
    const app=Vue.createApp({
        data(){
            return{
                classString:'green',
                classObject:{red:true,green:true},
                classArray:['red','green',{brown:true}]
            }
        },
        // template:`<div :class='classString'>Hello world</div>`
        // template:`<div :class='classObject'>Hello world</div>`
        template:`
        <div :class='classArray'>
            Hello world
            <demo class='red ' />
        </div>`
    });
    app.component('demo',{
        template:`<div>single</div>`
        // template:`<div class='red'>single</div>`
    })
    const vm = app.mount('#root')
</script>